package string;

public class TestEquals {
    public static void main(String[] args) {
//        t1();
        String s="java";
        StringBuilder sb = new StringBuilder("java");
        System.out.println(s.equals(sb));//false StringBuilder类型，直接返回false
        System.out.println(s.equals(sb.toString()));//true
        System.out.println(s==sb.toString());//false
    }

    private static void t1() {
        Integer a = 20;
        Long b = 20l;
        System.out.println(a.equals(b));
        System.out.println(a.intValue() == b.longValue());
    }
}
